package com.ddtech.business.task.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.ddtech.business.common.BaseEntity;
import com.ddtech.business.task.vo.req.MyTaskCourseVo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 任务表
 * </p>
 *
 * @author bin_pu
 * @since 2023-02-06
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="Task对象", description="任务表")
public class Task extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "任务名称")
    private String taskName;

    @ApiModelProperty(value = "任务描述")
    private String taskDesc;

    @ApiModelProperty(value = "开始时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    @ApiModelProperty(value = "结束时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "学习时长")
    private Integer duration;

    @ApiModelProperty(value = "任务状态：0未发布，1已发布")
    private Integer status;

    @ApiModelProperty(value = "关联考核任务")
    private String checkId;

    @ApiModelProperty(value = "创建人")
    private String createBy;



    @TableField(exist = false)
    @ApiModelProperty("课程列表")
    private List<MyTaskCourseVo> courseList;
}
